/*
 * @Author: Aster lipian1004@163.com
 * @Date: 2022-08-25 15:41:16
 * @LastEditors: Aster lipian1004@163.com
 * @LastEditTime: 2023-12-15 16:01:56
 * @FilePath: \aster-uniapp\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createSSRApp } from 'vue';
import App from './App.vue';
import { setupStore } from '@/store';
import '@/assets/style/main.scss';
import Vconsole from 'vconsole';
import { setupProdMockServer } from '@/mock';
if (process.env.NODE_ENV === 'production') {
  setupProdMockServer();
}

const vConsole: any = new Vconsole();

export function createApp() {
  const app = createSSRApp(App);
  app.use(vConsole);
  // Configure store
  setupStore(app);

  return {
    app,
  };
}
